FROM python:3.7.5-alpine
COPY ./server/requirements.txt /req/
WORKDIR /req
ENV PRODUCT=on
RUN echo http://mirrors.aliyun.com/alpine/v3.10/main/ > /etc/apk/repositories
RUN apk update \
    && apk apk upgrade \
    && apk --update add libxml2-dev libxslt-dev libffi-dev gcc musl-dev libgcc openssl-dev curl \
    && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
    && pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
CMD ["python", "/code/server/main.py"]
